package com.zimmur.controller;

import javax.annotation.Resource;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.zimmur.service.IUserService;

@Controller
@RequestMapping("/weibo")
public class WeiboController extends BaseController {
	private static Logger log=LoggerFactory.getLogger(UserController.class);
	
	 @Resource(name="userService")
	 private IUserService userService;  
	 
	 @ResponseBody
	 @RequestMapping(value="/cancelauthor")
	 public void cancelAuthorize(){
		 String source = getParam("source");
		 String uid  = getParam("uid");
		 String auth_end  = getParam("auth_end ");
		 
		 if(source.equals("3739904219") && !uid.equals("")){
			 userService.weiboUserCanelAuthor(uid);
			 log.info("cancelAuthorize"+uid+" success!");
		 }
	 }
	
}
